package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.utils.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("SELECT * FROM User WHERE userID = #{userID} AND password = #{password}")
    User findUserByUserIDAndPassword(@Param("userID") String userID, @Param("password") String password);

    @Select("SELECT * FROM User WHERE username = #{username}")
    User findUserByUsername(@Param("username") String username);
}
